It is known that in semiconductor laser diodes heating of the resonator that is inhomogeneous in a lateral direction may lead to a lateral refractive index profile that brings about a lens effect that disadvantageously influences the beam quality. This effect is referred to as a thermal lens.